package com.ethink.warehouse.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.request.*;
import com.ethink.warehouse.api.response.LogisticsTransferOrderAddResponse;
import com.ethink.warehouse.api.response.LogisticsTransferOrderDetailResponse;
import com.ethink.warehouse.api.response.LogisticsTransferOrderQueryItemModeResponse;
import com.ethink.warehouse.api.response.LogisticsTransferOrderQueryResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 物流调拨单 Facade接口
 *
 * @author default
 * @date 2022-11-10
 */
@FeignClient(name = "ethink-warehouse-service", path = "warehouse-service/facade/v1/logisticsTransferOrder", contextId = "logisticsTransferOrderFacade")
public interface LogisticsTransferOrderFacade {

    @PostMapping("/queryLogisticsTransferOrder")
    @ResponseBody
    Page<LogisticsTransferOrderQueryResponse> queryLogisticsTransferOrder(@RequestBody LogisticsTransferOrderQueryRequest request);

    @PostMapping("/queryLogisticsTransferOrderSum")
    @ResponseBody
    LogisticsTransferOrderQueryResponse queryLogisticsTransferOrderSum(@RequestBody LogisticsTransferOrderQueryRequest request);

    @PostMapping("/getLogisticsTransferOrderById")
    @ResponseBody
    LogisticsTransferOrderDetailResponse getLogisticsTransferOrderById(@RequestParam("logisticsTransferOrderId") Long logisticsTransferOrderId);

    @PostMapping("/addLogisticsTransferOrder")
    @ResponseBody
    LogisticsTransferOrderAddResponse addLogisticsTransferOrder(@RequestBody LogisticsTransferOrderAddRequest request);

    @PostMapping("/updateLogisticsTransferOrder")
    @ResponseBody
    void updateLogisticsTransferOrder(@RequestBody LogisticsTransferOrderUpdateRequest request);

    @PostMapping("/deleteLogisticsTransferOrder")
    @ResponseBody
    void deleteLogisticsTransferOrder(@RequestParam("logisticsTransferOrderId") Long logisticsTransferOrderId);

    @PostMapping("/setLogisticsTransferOrderStatus")
    @ResponseBody
    void setLogisticsTransferOrderStatus(@RequestBody LogisticsTransferOrderSetStatusRequest request);

    @PostMapping("/cancelLogisticsTransferOrder")
    @ResponseBody
    void cancelLogisticsTransferOrder(@RequestParam("logisticsTransferOrderId") Long logisticsTransferOrderId);

    @PostMapping("/queryLogisticsTransferDetailOrderNosByOrderNos")
    @ResponseBody
    List<String> queryLogisticsTransferDetailOrderNosByOrderNos(@RequestBody List<String> orderNos);

    @GetMapping("/updateLogisticsTransferOrderStatus")
    @ResponseBody
    void updateLogisticsTransferOrderStatus(@RequestParam("orderNos") List<String> orderNos);

    /**
     * 货品模式分页查询
     *
     * @param request
     * @return
     */
    @PostMapping("/queryItemModeLogisticsTransferOrder")
    @ResponseBody
    Page<LogisticsTransferOrderQueryItemModeResponse> queryItemModeLogisticsTransferOrder(@RequestBody LogisticsTransferOrderQueryItemModeRequest request);
}